package com.ruoyi.report.mapper;

import java.util.List;
import com.ruoyi.report.domain.ReportOilDepot;
import com.ruoyi.report.domain.ReportOilDepotDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 油库Mapper接口
 * 
 * @author ruoyi
 * @date 2024-10-15
 */
public interface ReportOilDepotMapper 
{
    /**
     * 查询油库
     * 
     * @param id 油库ID
     * @return 油库
     */
    public ReportOilDepot selectReportOilDepotById(Long id);

    /**
     * 查询油库列表
     * 
     * @param reportOilDepot 油库
     * @return 油库集合
     */
    public List<ReportOilDepot> selectReportOilDepotList(ReportOilDepot reportOilDepot);

    public String maxName();

    /**
     * 新增油库
     * 
     * @param reportOilDepot 油库
     * @return 结果
     */
    public int insertReportOilDepot(ReportOilDepot reportOilDepot);
    @Select("SELECT COUNT(*) FROM report_oil_depot WHERE dept_id = #{deptId} AND name = CURDATE()")
    Integer countTodayRecordsDepot(@Param("deptId") Long deptId);
    /**
     * 修改油库
     * 
     * @param reportOilDepot 油库
     * @return 结果
     */
    public int updateReportOilDepot(ReportOilDepot reportOilDepot);

    /**
     * 删除油库
     * 
     * @param id 油库ID
     * @return 结果
     */
    public int deleteReportOilDepotById(Long id);

    /**
     * 批量删除油库
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteReportOilDepotByIds(Long[] ids);

    /**
     * 批量删除油罐信息详情
     * 
     * @param customerIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteReportOilDepotDetailByDepotIds(Long[] ids);
    
    /**
     * 批量新增油罐信息详情
     * 
     * @param reportOilDepotDetailList 油罐信息详情列表
     * @return 结果
     */
    public int batchReportOilDepotDetail(List<ReportOilDepotDetail> reportOilDepotDetailList);
    

    /**
     * 通过油库ID删除油罐信息详情信息
     * 
     * @param id 油库ID
     * @return 结果
     */
    public int deleteReportOilDepotDetailByDepotId(Long id);
}
